package com.android.tea;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.android.tea.util.StringUtils;
import com.android.tea.util.TeaLog;



public class TeaMessageActivity extends BaseWebViewActivity implements OnClickListener{
	
	private ImageView btn_back;
	private ImageView btn_right;

	@Override
	protected void setView() {
		layoutId = R.layout.news;
		super.setView();
	}

	@Override
	protected void initURL() {
		boolean from = getIntent().getBooleanExtra("from",false);
		if(from) {
			String url = getIntent().getStringExtra("url");
			initUrl = url;
		}else {
			initUrl = "http://www.chabaike.cn/index.php?m=wap&siteid=1&a=lists&typeid=6";
		}
		
		
		btn_back = (ImageView)findViewById(R.id.btn_back);
		btn_right = (ImageView)findViewById(R.id.btn_right);
//		btn_back.setVisibility(View.VISIBLE);
//		btn_right.setVisibility(View.VISIBLE);
		btn_back.setOnClickListener(this);
		btn_right.setOnClickListener(this);
		
		super.initURL();
	}
	
	@Override
	protected void onStop() {
		super.stopLoading();
		super.onStop();
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_back:
			TeaLog.e(TAG, "back is press");
			super.onBackPressed();
			break;
		case R.id.btn_right:
			TeaLog.e(TAG, "right is press");
			break;
		default:
			break;
		}
		
	}
}